@(title: String)(content: Html)(implicit session: Session)

<!DOCTYPE html>

<html lang="en">
  <head>
    <title>@title</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" media="screen" href="@routes.Assets.versioned("bootstrap-sweetalert-master/dist/sweetalert.css")">
    <link rel="stylesheet" media="screen" href="@routes.Assets.versioned("FormValidation/dist/css/formValidation.min.css")">
    <link rel="stylesheet" media="screen" href="@routes.Assets.versioned("select2-4.0.3/dist/css/select2.min.css")">
    <link rel="stylesheet" media="screen" href="@routes.Assets.versioned("bootstrap/css/bootstrap.min.css")">
    <link rel="stylesheet" media="screen" href="@routes.Assets.versioned("bootstrap/css/bootstrap-theme.min.css")">
    <link rel="stylesheet" media="screen" href="@routes.Assets.versioned("font-awesome-4.7.0/css/font-awesome.min.css")">
    <link rel="stylesheet" media="screen" href="@routes.Assets.versioned("layout/layout.css")">
    <link rel="stylesheet" media="screen" href="@routes.Assets.versioned("stylesheets/components.css")">
    <link rel="stylesheet" media="screen" href="@routes.Assets.versioned("stylesheets/default.css")">
    <link rel="stylesheet" media="screen" href="@routes.Assets.versioned("stylesheets/uniform.default.css")">
    <link rel="stylesheet" media="screen" href="@routes.Assets.versioned("bootstrap-fileinput-master/css/fileinput.min.css")">
    <link rel="stylesheet" media="screen" href="@routes.Assets.versioned("bootstrap-table-master/dist/bootstrap-table.min.css")">
    <link rel="stylesheet" media="screen" href="@routes.Assets.versioned("stylesheets/my.css")">
    <link rel="stylesheet" media="screen" href="@routes.Assets.versioned("config/css/my-model.css")">

    <script src="@routes.Assets.versioned("bootstrap/js/jquery-3.1.1.min.js")" type="text/javascript"></script>
    <script src="@routes.Assets.versioned("javascripts/jquery-migrate-1.2.1.min.js")" type="text/javascript"></script>
    <script src="@routes.Assets.versioned("bootstrap/js/bootstrap.min.js")" type="text/javascript"></script>
    <script src="@routes.Assets.versioned("bootstrap-table-master/dist/bootstrap-table.min.js")" type="text/javascript"></script>
    <script src="@routes.Assets.versioned("bootstrap-table-master/dist/locale/bootstrap-table-zh-CN.min.js")" type="text/javascript"></script>
    <script src="@routes.Assets.versioned("javascripts/metronic.js")" type="text/javascript"></script>
    <script src="@routes.Assets.versioned("layout/layout.js")" type="text/javascript"></script>
    <script src="@routes.Assets.versioned("javascripts/qucik-siderbar.js")" type="text/javascript"></script>
    <script src="@routes.Assets.versioned("javascripts/demo.js")" type="text/javascript"></script>
    <script src="@routes.Assets.versioned("FormValidation/dist/js/formValidation.min.js")" type="text/javascript"></script>
    <script src="@routes.Assets.versioned("FormValidation/dist/js/framework/bootstrap.min.js")" type="text/javascript"></script>
    <script src="@routes.Assets.versioned("bootstrap-sweetalert-master/dist/sweetalert.min.js")" type="text/javascript"></script>
    <script src="@routes.Assets.versioned("bootstrap-table-master/dist/extensions/export/bootstrap-table-export.min.js")" type="text/javascript"></script>
    <script src="@routes.Assets.versioned("bootstrap-table-master/dist/extensions/export/tableExport.min.js")" type="text/javascript"></script>
    <script src="@routes.Assets.versioned("layer-v3.0/layer/layer.js")" type="text/javascript"></script>
    <script src="@routes.Assets.versioned("select2-4.0.3/dist/js/select2.full.min.js")" type="text/javascript"></script>
    <script src="@routes.Assets.versioned("select2-4.0.3/dist/js/i18n/zh-CN.js")" type="text/javascript"></script>
    <script src="@routes.Assets.versioned("javascripts/bootstrap3-typeahead.min.js")" type="text/javascript"></script>
    <script src="@routes.Assets.versioned("javascripts/multiselect.min.js")" type="text/javascript"></script>
    <script src="@routes.Assets.versioned("bootstrap-fileinput-master/js/fileinput.min.js")" type="text/javascript"></script>
    <script src="@routes.Assets.versioned("bootstrap-table-master/dist/extensions/multiple-search/bootstrap-table-multiple-search.min.js")" type="text/javascript"></script>
    <script src="@routes.Assets.versioned("javascripts/main.js")" type="text/javascript"></script>
    <script src="@routes.Assets.versioned("config/js/jquery.cookie.js")" type="text/javascript"></script>
    <style>


    </style>
  </head>
  <body class="page-header-fixed page-quick-sidebar-over-content">
    <div class="page-container">
      @adminSpecies.left()

      <div class="page-content-wrapper">
        <div class="page-content">
          @content
        </div>
      </div>
    </div>
  </body>
  <script>

          jQuery(document).ready(function () {
            // initiate layout and plugins
            Metronic.init(); // init metronic core components
            Layout.init(); // init current layout
            QuickSidebar.init(); // init quick sidebar
            Demo.init(); // init demo features

            let localHref = window.location.href;
            let host = window.location.hostname;
            let parentHref = 'http://' + host + '/back/parametron';
            window.parent.postMessage(localHref,parentHref);

            /**
             *当新标签页打开时，实现还是主页面的效果
             *如果报错，则证明是在平台内，如果没有报错，则是在子页面
             */
            try {
              let parent = window.parent.location.href
              if (parent === localHref) {
                if (window.name === "") {
                  let uuid2 = random4() + random4();
                  window.name = uuid2;
                  let cookie1 = "parametron" + uuid2;
                  //添加path，主页面才能获取子页面的cookie
                  $.cookie(cookie1, localHref, { path: '/' })
                }
                window.location.href=(parentHref)
              }
            } catch (e) {

            }

          });

          function random4() {
            return ((1 + Math.random()) * 0x10000 | 0).toString(16).substring(1);
          }

  </script>
</html>
